package com.homeWork.factory;

import com.homeWork.fish.Fish;
import com.homeWork.fish.impl.BigFish;
import com.homeWork.fish.impl.SmallFish;
import com.homeWork.fish.impl.WaterFish;

public class FishFactory {
    public Fish createFish(String fishType){
        if ("WaterFish".equals(fishType)){
            return new WaterFish();
        }else if ("BigFish".equals(fishType)){
            return new BigFish();
        }else if ("SmallFish".equals(fishType)){
            return new SmallFish();
        }return null;
    }
}
